package com.coocaa.ccmvp.demo.p;

import android.content.Context;

import com.coocaa.ccmvp.demo.m.IDemoModel;
import com.coocaa.ccmvp.demo.v.IDemoView;

/**
 * Created by Lu on 2017/1/15.
 */

public class DemoPresenter implements IDemoPresenter {
    private IDemoModel model = null;

    @Override
    public void login(String name, String passwd) {
        if (!model.isLogin(name))
            model.login(name, passwd);
    }

    @Override
    public void create(Context context) {

    }

    @Override
    public void attachModel(IDemoModel model) {
        this.model = model;
    }

    @Override
    public void attachView(IDemoView view) {

    }

    @Override
    public void destroy() {

    }
}
